package com.chiry.vo.mapper;


import com.chiry.vo.Product;
import com.chiry.vo.ProductVO;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.Mappings;
import org.mapstruct.factory.Mappers;

@Mapper
public interface ProductMapper {
    ProductMapper mapper = Mappers.getMapper(ProductMapper.class);

    @Mappings({

            @Mapping(source = "productId", target = "id"),
            @Mapping(source = "productName", target = "name"),
            @Mapping(source = "productPrice", target = "price")
        }
    )
    ProductVO pojo2Vo(Product product);
}
